package  
{
	import flash.display.MovieClip;
	/**
	 * ...
	 * @author Seven Gae
	 */
	public class Splash extends Level_Base 
	{
		private var background : FlashingBackground;
		private var texto : MovieClip; 
		
		private var splashTimer:uint;
		
		public override function start():void
		{	
			background = new FlashingBackground();
			
			texto = new Texto()
			texto.x = Main.Self.stage.stageWidth / 2;
			texto.y = Main.Self.stage.stageHeight / 2;
			texto.alpha = 0;
			Main.Self.screen.addChild(texto);
			
			splashTimer = 0;
		}
		
		public override function update():void
		{
			if (splashTimer == 144)
				LevelManager.current = new Level1();
			else 
			{
				splashTimer++;
				
				if (splashTimer <= 36)
					texto.alpha += 0.0278;
				
				if (splashTimer >= 108)
					texto.alpha -= 0.0278;
			}
				
			
		}
		
		public override function terminate():void
		{
			background.destroy();
			Main.Self.screen.removeChild(texto);
		}
		
	}

}